<template>
	<view class="container">
		<view class="bg"></view>
		<!-- 我的信息 -->
		<view class="my-title">
			<view class="avatar" :class="{'vip-avatar':staffDetail.user.vipFlag==1}">
				<image :class="staffDetail.user.vipFlag==0?'avatar-pic':'avatar-pic-vip'"
					:src="imgPath + staffDetail.user.avatar" mode="aspectFill" @click="isShowheadImage=true"></image>
				<!-- <image v-if="staffDetail.user.vipFlag" class="crown" src="/static/crown.png" mode="aspectFill"></image> -->
				<view v-if="staffDetail.user.vipFlag" class="vip-crown">
					<image src="http://images.linglinggong.net/icon3/adasdasd.png" mode="aspectFill">
					</image>
					<text>金牌临时工</text>
				</view>
			</view>
			<view class="name">
				<text>{{ staffDetail.user.userName }}</text>
				<!-- <image :src="staffDetail.user.sex==1 ? '/static/icon1/21.png' : '/static/icon1/55.png'"
					mode="aspectFill"></image> -->
				<view v-if="staffDetail.user.sex==0" class="sex-nan">
					<image class="sex-image" src="https://images.linglinggong.net/icon3/nna1111.png" mode="aspectFill">
					</image>{{!staffDetail.user.age ? '未知' : staffDetail.user.age}}
				</view>
				<view v-if="staffDetail.user.sex==1" class="sex-nv">
					<image class="sex-image" src="https://images.linglinggong.net/icon3/nv111.png" mode="aspectFill">
					</image>{{!staffDetail.user.age ? '未知' : staffDetail.user.age}}
				</view>
			</view>
			<!-- <view class="haoping-view">
				<text>好评率 {{staffDetail.haoping}}%</text>
			</view> -->
			<view class="category">
				<!--<view>
					<text>{{ publicWorkNum ? publicWorkNum : 0  }}</text>
					<view>发单记录</view>
				</view>-->
				<view>
					<text>{{ acceptTaskNum ? acceptTaskNum : 0 }}</text>
					<view>接单记录</view>
				</view>
				<view>
					<text>{{ staffDetail.employeeRating }}</text>
					<view>评分</view>
				</view>
			</view>
		</view>
		<view class="info my-info" v-if="Object.keys(staffDetail).length !== 0">
			<!-- <view class="mm-tips" v-show="isShowFirst" @click="handleClose">
				<image src="https://images.linglinggong.net/static/ggrz.png" mode="widthFix"></image>
			</view> -->
			<view class="my-info-center">
				<view class="my-info-center-item">
					<view class="my-info-center-item-left">
						<text>综合好评率</text>
					</view>
					<view class="my-info-center-item-mid">
						<u-line-progress :height="24" :showText="false"
							activeColor="linear-gradient(to right , #EDEA2F 15%,#F77700 80%)"
							:percentage="pingjia.positiveReviewRate*100"></u-line-progress>
					</view>
					<view class="my-info-center-item-right">
						<text v-if="pingjia.positiveReviewRate">{{(pingjia.positiveReviewRate*100).toFixed(0)}}%</text>
						<text v-else>0%</text>
					</view>
				</view>
				<view class="my-info-center-item">
					<view class="my-info-center-item-left">
						<text>任务完单率</text>
						<view class="tips3">
							<uni-tooltip :styleType="1" :styleType2="1" :styleType3="1" content="雇主发布任务时长和雇员实际工作时长的比例">
								<image src="https://images.linglinggong.net/FrZhpPAls_7GZSUfifG5vPRTPtxb"
									mode="widthFix"></image>
							</uni-tooltip>
						</view>
					</view>
					<view class="my-info-center-item-mid">
						<u-line-progress :height="24" :showText="false"
							activeColor="linear-gradient(to right , #EDEA2F 15%,#F77700 80%)"
							:percentage="pingjia.taskCompletionRate*100"></u-line-progress>
					</view>
					<view class="my-info-center-item-right">
						<text v-if="pingjia.taskCompletionRate">{{(pingjia.taskCompletionRate*100).toFixed(0)}}%</text>
						<text v-else>0%</text>
					</view>
				</view>
				<view class="my-info-center-item">
					<view class="my-info-center-item-left">
						<text>试工成功率</text>
						<view class="tips3">
							<uni-tooltip :styleType="1" :styleType2="1" :styleType3="1" content="雇员到达现场试工后成功次数的比例">
								<image src="https://images.linglinggong.net/FrZhpPAls_7GZSUfifG5vPRTPtxb"
									mode="widthFix"></image>
							</uni-tooltip>
						</view>
					</view>
					<view class="my-info-center-item-mid">
						<u-line-progress :height="24" :showText="false"
							activeColor="linear-gradient(to right , #EDEA2F 15%,#F77700 80%)"
							:percentage="pingjia.trialSuccessRate*100"></u-line-progress>
					</view>
					<view class="my-info-center-item-right">
						<text v-if="pingjia.trialSuccessRate">{{(pingjia.trialSuccessRate*100).toFixed(0)}}%</text>
						<text v-else>0%</text>
					</view>
				</view>
				<view class="my-info-center-item">
					<view class="my-info-center-item-left">
						<text>准点到达率</text>
						<view class="tips3">
							<uni-tooltip :styleType="1" :styleType2="1" :styleType3="1" content="雇员按时到达工作地点准时开工的次数比例">
								<image src="https://images.linglinggong.net/FrZhpPAls_7GZSUfifG5vPRTPtxb"
									mode="widthFix"></image>
							</uni-tooltip>
						</view>
					</view>
					<view class="my-info-center-item-mid">
						<u-line-progress :height="24" :showText="false"
							activeColor="linear-gradient(to right , #EDEA2F 15%,#F77700 80%)"
							:percentage="pingjia.timeArrivalRate*100"></u-line-progress>
					</view>
					<view class="my-info-center-item-right">
						<text v-if="pingjia.timeArrivalRate">{{(pingjia.timeArrivalRate*100).toFixed(0)}}%</text>
						<text v-else>0%</text>
					</view>
				</view>
			</view>
		</view>
		<!-- 基本信息 -->
		<view class="info my-info" v-if="false">
			<text>基本信息</text>
			<view>
				<view>
					<view>
						<text>真实姓名</text>
						<text>{{ staffDetail.realName ? staffDetail.realName.replace(staffDetail.realName.slice(1,3), '**') : '**' }}</text>
					</view>
					<view>
						<text>身份</text>
						<text>{{ staffDetail.user.expectType }}</text>
					</view>
					<view>
						<text>年龄</text>
						<text>{{ staffDetail.user.age }}</text>
					</view>
				</view>
				<view>
					<view>
						<text>身高 (cm)</text>
						<text>{{ staffDetail.user.stature }}</text>
					</view>
					<view>
						<text>学历</text>
						<text>{{ staffDetail.user.edu }}</text>
					</view>
					<view>
						<text>日常活动地区</text>
						<text>{{ street[staffDetail.user.expectAddress] }}</text>
					</view>
				</view>
			</view>
		</view>
		<!-- 期望工种  -->
		<view class="info expect-work">
			<text>期望工种</text>
			<view class="tags" v-if="workTypeList.length">
				<text v-for="item in workTypeList">{{ item }}</text>
			</view>
		</view>
		<!-- ta -->
		<view class="ta">
			<!-- 类目 -->
			<view class="category"
				:style="{'border-bottom-left-radius': flag == 0 ? '7px' : '','border-bottom-right-radius': flag == 1 ? '7px' : '','border-bottom-right-radius': flag == 2 ? '7px' : ''}">
				<view :class="flag == 2 ? 'select' : ''" @tap="handleTypeChange(2)"
					:style="{'border-bottom-left-radius': flag == 2 ? '7px' : ''}">
					{{userInfo.userid == staffId ? '我' : 'ta'}}的技能
				</view>
				<view :class="flag == 0 ? 'select' : ''" @tap="handleTypeChange(0)"
					:style="{'border-bottom-left-radius': flag == 0 ? '7px' : ''}">ta的工作</view>
				<view :class="flag == 1 ? 'select' : ''" @tap="handleTypeChange(1)"
					:style="{'border-bottom-right-radius': flag == 1 ? '7px' : ''}">ta的评价</view>
			</view>
			<!-- ta的技能 -->
			<view class="job-list" v-show="flag==2">
				<view class="ta-skill" v-for="(item,index) in taSkillData" :key="index">
					<text class="ta-skill-title">{{ item.cateName }}</text>
					<view class="ta-skill-content">
						<view class="ta-skill-content-flex">
							<view class="ta-skill-content-dot"></view>
							<view class="ta-skill-content-data">
								<text>工作时长</text>
								<text class="ta-skill-content-data-color">{{ item.cateTime?item.cateTime:0 }}小时</text>
							</view>
						</view>
						<view class="ta-skill-content-flex">
							<view class="ta-skill-content-dot"></view>
							<view class="ta-skill-content-data">
								<text>好评率</text>
								<text class="ta-skill-content-data-color">
									{{ item.cateGood || item.cateComment ? 
										(item.cateGood / item.cateComment * 100).toFixed(2) : '0'
									}}% </text>
							</view>
						</view>
					</view>
				</view>
			</view>
			<!-- ta的工作 -->
			<view class="job-list" v-show="flag==0">
				<!-- <view>
					<view>
						<text>发单记录</text>
						<text>({{ publicWorkNum ? publicWorkNum : 0 }})</text>
					</view>
					<view class="list">
						<view v-for="item in publicWorkList">
							<view></view>
							<view>{{ item }}</view>
						</view>
					</view>
				</view> -->
				<view>
					<view>
						<text>接单记录</text>
						<text>({{ acceptTaskNum ? acceptTaskNum : 0}})</text>
					</view>
					<view class="list">
						<view v-for="item in acceptTaskList">
							<view></view>
							<view>{{ item }}</view>
						</view>
						<uni-load-more :status="hasWorkFlag ? 'loading' : isNoMore ? 'noMore' : ''"></uni-load-more>
					</view>
				</view>
			</view>
			<!-- ta的评价 -->
			<view class="comment-list" v-show="flag==1">
				<view class="btns">
					<view class="btn">
						<image src="http://images.linglinggong.net/static/icon3/satisfied1.png" mode=""></image>
						满意({{satisfied}})
					</view>
					<view class="btn">
						<image src="http://images.linglinggong.net/static/icon3/satisfied2.png" mode=""></image>
						不满意({{dissatisfied}})
					</view>
					<view class="haoping-btn">
						<text>默认好评</text>
						<switch :checked="defaultHaoping" class="switch" @change="handleChange" color="#FF851D" />
					</view>
				</view>
				<view class="item" v-for="item in evaluateList">
					<view class="by-user" style="height: 74rpx;">
						<view class="left">
							<!-- <image :src="imgPath + item.avatar" mode="aspectFill"></image> -->
							<image src="http://images.linglinggong.net/FqbM4OLbmiUwDDB984eZl5lJudxS" mode="aspectFill">
							</image>
							<view class="middle">
								<view>{{ item.userName }}</view>
								<text>{{item.createTime.slice(0, 11) }}</text>
							</view>
						</view>
						<view class="star">
							<!-- <view
								style="width:100%;height: 100%;display: flex;justify-content: center;align-items: center;">
								<u-rate :count="5" active-color="#FCC928" :inactiveColor="'#b2b2b2'" gutter="0"
									:size="46" v-model.number="item.score" readonly></u-rate>
							</view> -->
							<view v-if="parseInt(item.score)>2">
								<image src="https://images.linglinggong.net/static/icon3/satisfied3.png" mode="">
								</image> 满意
							</view>
							<view v-else>
								<image src="https://images.linglinggong.net/static/icon3/satisfied8.png" mode="">
								</image> 不满意
							</view>
						</view>
					</view>
					<view class="content">{{ item.appraise }}</view>
				</view>
				<view class="zhedie" v-if="!defaultHaoping"> 已折叠{{defaultHaopingListLength}}条默认好评 </view>
				<uni-load-more :status="hasFlagEvaluate ? 'loading' : isNoMore ? 'noMore' : ''"></uni-load-more>
			</view>
		</view>
		<!-- 固定按钮  -->
		<view class="fix-bottom" v-show="!isBlackPage">
			<view @click="handleCollect">
				<image
					:src="isCollect ? 'https://images.linglinggong.net/icon1/39.png' : 'https://images.linglinggong.net/icon1/38.png'"
					mode="aspectFill"></image>
				<text>收藏</text>
			</view>
			<view v-if="userJobStatus == 1" @click="handleInvite2" class="button" :style="{ background:'#ccc'}"> 邀请ta接单
			</view>
			<view v-else class="button" @click="handleInvite" :style="{ background: isInvite ? '#D2B48C' : '#FCC928'}">
				{{ isInvite ? '已邀请' : '邀请ta接单'}}
			</view>
		</view>
		<!-- <view class="fix-bottom" v-show="isBlackPage">
			<view class="button" @click="Kick_black()" :style="{ background: isInvite ? '#D2B48C' : '#FCC928'}">剔除黑名单
			</view>
		</view> -->
		<view class="mask-head-image" v-if="isShowheadImage" @click="isShowheadImage=false">
			<image :src="imgPath + staffDetail.user.avatar" mode="aspectFill"
				:style="{width: screenWidth + 'px', height:screenHeight + 'px' }"></image>
		</view>
	</view>
</template>
<script>
	import {
		he_evaluate_lv,
	} from '@/libs/unit.js'
	// import chat from '@/libs/chat.js'
	export default {
		data() {
			return {
				taSkillData: {}, //ta的技能
				screenWidth: '0',
				screenHeight: '0', //获取手机宽高
				vipFlag: 0, //0不是vip雇员，1vip雇员
				jobListNum: '', //当前雇主上架任务数量
				location: [], //[lat, lng]当前位置
				userInfo: {
					user: {},
					params: {}
				}, //当前用户信息
				workRow: [], //接单列表拼接
				hasFlagEvaluate: true, // 是否还有更多评价要加载
				isInvite: 0, //是否已经邀请,暂时无法判断是否已邀请
				flag: 0, //更改类目
				isCollect: 0, //是否收藏
				imgPath: '', //图片路径
				staffId: '', //雇员id
				staffDetail: {
					user: {},
					params: {}
				}, //当前雇员信息
				street: {}, //街道
				workTypeList: [], //期望工种
				evaluateObj: { //他的评价参数
					pageNum: 0,
					pageSize: 10,
					type: 1,
					userId: '',
				},
				evaluateList: [], //评价列表
				hasWorkFlag: true, // 是否还有更多数据要加载
				workObj: { //他的工作参数
					pageNum: 0,
					pageSize: 1000,
					type: 0,
					userId: '',
					orderByColumn: 'create_time',
					isAsc: 'asc',
				},
				userType: uni.getStorageSync('userType'),
				acceptTaskList: [], //接单工作
				acceptTaskNum: '', //接单数量
				publicWorkList: [], //发单工作
				publicWorkNum: '', //发单数量
				handleIsStop: true, // 是否允许查看更多
				isOldPage: false, //是否从老雇员邀请页面过来的
				isBlackPage: false, //是否从黑名单页过来的
				blackId: '',
				isShowheadImage: false,
				isNoMore: false,
				jumpType: 0,
				isShowFirst: false,
				userJobStatus: 0,
				pingjia: {},
				satisfied: '',
				dissatisfied: '',
				defaultHaoping: true,
				originEvaluateList: [],
				defaultHaopingList: [],
				defaultHaopingListLength: ''
			}
		},
		methods: {
			handleChange(e) {
				this.defaultHaoping = e.detail.value
				this.defaultHaopingList = this.evaluateList.filter((item) => {
					return item.appraise == "系统默认好评"
				})
				this.defaultHaopingListLength = this.defaultHaopingList.length
				if (!this.defaultHaoping) {
					this.evaluateList = this.evaluateList.filter((item) => {
						return item.appraise !== "系统默认好评"
					})
				} else {
					this.evaluateList = this.originEvaluateList
				}
			},
			async statistical_positive_review_rate() {
				let res = await this.$fetch(this.$api.statistical_positive_review_rate, {
					userId: this.staffId
				}, 'POST')
				if (res.code) uni.showToast({
					title: res.msg,
					icon: 'none'
				})
				this.satisfied = res.data.satisfied
				this.dissatisfied = res.data.dissatisfied
			},
			async employee_evaluation() {
				let res = await this.$fetch(this.$api.employee_evaluation, {
					userId: this.staffId
				}, 'POST')
				if (res.code) uni.showToast({
					title: res.msg,
					icon: 'none'
				})
				this.pingjia = res.data
			},
			handleStar(index) {
				console.log(index)
			},
			handleClose() {
				this.isShowFirst = false
			},
			zdyBack() {
				this.jumpType = 0
				uni.navigateBack()
			},
			// 获取当前雇主的上架任务列表
			async task_list() {
				let obj = { //上传参数
					isAsc: 'asc', //排序(asc:正序,desc:倒序))
					orderByColumn: 'createTime', //默认排序，0离我最近，1最新发布，2诚信值降序
					pageNum: 1,
					pageSize: 1000,
					status: 3, //上架的工作
					userId: '', //谁发布的
					lat: '',
					lng: '',
				}
				obj.lat = this.location[0]
				obj.lng = this.location[1]
				obj.userId = this.userInfo.user.userId
				// console.log('雇主的上架任务列表条件', obj)
				let res = await this.$fetch(this.$api.task_list, obj, 'POST')
				if (res.code) return uni.showToast({
					title: res.msg,
					icon: 'none'
				})
				this.jobListNum = res.rows.length
				// console.log('雇主的上架任务列表', res.rows)
			},
			// 邀请接单，有任务跳到任务列表，没有跳到发单页面
			handleInvite() {
				if (this.isOldPage) {
					// uni.$emit('selctFun',this.staffId)
					uni.navigateBack({
						delta: 1
					})
					setTimeout(() => {
						let pages = getCurrentPages()
						pages[pages.length - 1].$vm.selctFun(parseInt(this.staffId))
					}, 400)
					return
				}
				if (this.jobListNum) {
					uni.navigateTo({
						url: '/pages/app-employer/boss-task-list/boss-task-list?staffId=' + this.staffId
					})
				} else {
					uni.navigateTo({
						url: '/pages/app-employer/send-job/send-job'
					})
				}
			},
			handleInvite2() {
				uni.showToast({
					title: '该雇员已有任务',
					icon: 'none'
				})
			},
			// 沟通
			handleChat(id) {
				let lat = uni.getStorageSync('location')[0]
				let lng = uni.getStorageSync('location')[1]
				let address = uni.getStorageSync('currentAddress')
				let imUsername = 'zlg_' + id
				console.log('~~~~~~', imUsername, this.staffDetail.user.userName)
				chat(imUsername, this.staffDetail.user.userName, lat, lng, address)
			},
			// 查看更多
			handleMore(flag) {
				if (flag == 'public') {
					this.he_task() //再次调用接口
				} else {}
			},
			// 更改类目
			handleTypeChange(a) {
				this.flag = a
				this.isNoMore = false
			},
			// 获取雇员信息
			async get_user_by_id() {
				let res = await this.$fetch(this.$api.findUserById, {
					userId: this.staffId
				}, 'POST')
				if (res.code) return uni.showToast({
					title: res.msg,
					icon: 'none'
				})
				this.userJobStatus = res.data.userJobStatus
				// 整理数据,res.data.user为null，则改为""
				Object.getOwnPropertyNames(res.data.user).forEach(function(key) {
					res.data.user[key] = res.data.user[key] == null ? '' : res.data.user[key]
				})
				this.workTypeList = []
				// 初始化期望工种
				if (res.data.user.expectWorkType) {
					res.data.user.expectWorkType.split(',').forEach((item) => {
						this.workTypeList.push(item)
					})
				}
				// let haoping = uni.getStorageSync('heEvaluateLv') ? uni.getStorageSync('heEvaluateLv') : []
				// if (haoping.indexOf(res.data.userId) != -1) {
				// 	res.data.haoping = haoping[haoping.indexOf(res.data.userId) + 1]
				// } else {
				// 	he_evaluate_lv(res.data.userId).then((v) => {
				// 		res.data.haoping = v
				// 	})
				// }
				he_evaluate_lv(res.data.userId).then((v) => {
					res.data.haoping = v
				})
				setTimeout(() => {
					this.staffDetail = res.data
				}, 200)
				// console.log('staffDetail：', this.staffDetail)
			},
			// 是否收藏
			async is_collect() {
				let res = await this.$fetch(this.$api.is_collect, {
					relationId: this.staffId,
					type: 1
				}, 'POST')
				if (res.code) return uni.showToast({
					title: res.msg,
					icon: 'none'
				})
				// console.log('res.data',res.data)
				this.isCollect = res.data.collect
			},
			// 收藏或取消收藏
			async handleCollect() {
				let requestObj = {
					relationId: this.staffId,
					type: 1, //0是雇主，1雇员，2是任务
				}
				if (this.isCollect == 0) {
					let res = await this.$fetch(this.$api.add_collect, requestObj, 'POST', 'JSON')
					if (res.code) return uni.showToast({
						title: res.msg,
						icon: 'none'
					})
					this.isCollect = 1
				} else {
					let res = await this.$fetch(this.$api.cancel_collect, requestObj, 'POST')
					if (res.code) return uni.showToast({
						title: res.msg,
						icon: 'none'
					})
					this.isCollect = 0
				}
			},
			//ta的技能
			async getTaskCateUserAll() {
				console.log('来到这里');
				console.log(11, this.staffId);
				let res = await this.$fetch(this.$api.getTaskCateUserAll, {
					'userId': this.staffId
				}, 'GET')
				console.log('的技能', res.data);
				if (res.code == 0) {
					this.taSkillData = res.data;
				} else {
					uni.showToast({
						title: res.msg,
						icon: 'none'
					})
				}
			},
			// 获取他的评价
			async he_evaluate() {
				if (!this.hasFlagEvaluate) return // 说明已经没有更多啦
				this.evaluateObj.type = 0 //看雇员0
				this.evaluateObj.userId = this.staffId
				this.evaluateObj.pageNum = ++this.evaluateObj.pageNum
				let res = await this.$fetch(this.$api.he_evaluate, this.evaluateObj, 'POST')
				if (res.code) return uni.showToast({
					title: res.msg,
					icon: 'none'
				})
				this.evaluateList = [...this.evaluateList, ...res.rows]
				this.originEvaluateList = this.evaluateList
				console.log('获取评价', this.evaluateList)
				this.hasFlagEvaluate = this.evaluateObj.pageSize * this.evaluateObj.pageNum < res.total
				// console.log('评价数量', res.total)
			},
			// 获取他的工作
			async he_task() {
				if (!this.hasWorkFlag) return // 说明已经没有更多啦
				this.workObj.pageNum = ++this.workObj.pageNum
				this.workObj.userId = this.staffId
				let res = await this.$fetch(this.$api.he_task, this.workObj, 'POST')
				if (res.code) return uni.showToast({
					title: res.msg,
					icon: 'none'
				})
				this.workRow = [...this.workRow, ...res.data.acceptTask.rows]
				// 整理数据
				// this.workRow.forEach(item => {
				// 	this.publicWorkList.push(item.name) 
				// })
				// console.log('this.publicWorkList', this.publicWorkList)
				this.publicWorkNum = res.data.releaseTask.total
				this.acceptTaskList = []
				// 整理数据
				this.workRow.forEach(item => {
					this.acceptTaskList.push(item.taskName)
				})
				this.acceptTaskNum = res.data.acceptTask.total
				this.hasWorkFlag = this.workObj.pageSize * this.workObj.pageNum < this.acceptTaskNum
			},
			//剔除黑名单
			async Kick_black() {
				let res = await this.$fetch(this.$api.Kick_black, {
					Id: this.blackId
				}, 'POST')
				if (res.code) return uni.showToast({
					title: res.msg,
					icon: 'none'
				})
				uni.showToast({
					title: '已移除成功',
					icon: 'none'
				})
				setTimeout(() => {
					uni.navigateBack({
						delta: 1
					})
				}, 800)
			},
		},
		created() {},
		onLoad(options) {
			this.staffId = options.staffId
			this.isShowFirst = options.daytips == 'true' ? true : false
			this.screenWidth = uni.getStorageSync("imgWidth") == '' ? 750 : uni.getStorageSync("imgWidth")
			this.screenHeight = uni.getStorageSync("imghight") == "" ? 750 : uni.getStorageSync("imghight")
			this.evaluateList = []
			this.he_evaluate()
			this.jumpType = options.jumpType ? options.jumpType : 0
			if (options.isOldPage != null) {
				this.isOldPage = options.isOldPage
			}
			if (options.isBlackPage != null) {
				this.isBlackPage = options.isBlackPage
				this.blackId = options.BlackId
			}
			this.street = uni.getStorageSync('street')
			this.imgPath = uni.getStorageSync('imgPath')
			this.is_collect()
			this.get_user_by_id()
			this.getTaskCateUserAll()
			this.he_task()
		},
		onShow() {
			this.userInfo = uni.getStorageSync('userInfo')
			this.location = uni.getStorageSync('location') //当前位置的经纬度
			this.task_list()
			this.employee_evaluation()
			this.statistical_positive_review_rate()
		},
		onBackPress() {
			if (this.jumpType == 1) {
				this.zdyBack()
			}
		},
		onReachBottom() {
			this.isNoMore = true
			this.he_evaluate()
			this.he_task()
		},
		onShareAppMessage() {
			if (uni.getStorageSync('userType') == 1) {
				return {
					title: "足不出户，免费招工",
					desc: "线上招募零工，工价透明，免费使用",
					path: `/pages/start-n/start-n`,
					imageUrl: 'https://images.linglinggong.net/static/employer-share.jpg',
					success: res => {}
				}
			} else {
				return {
					title: "在家找日结兼职，工种齐全",
					desc: "免费使用，提前在家找日结兼职",
					path: `/pages/start-n/start-n`,
					imageUrl: 'https://images.linglinggong.net/static/employee-share.jpg',
					success: res => {}
				}
			}
		},
	}
</script>
<style lang="less">
	.container {
		border-top: 1px solid #FCC928; //不能删，ios会报损
		border-bottom: 1px solid #FCC928; //不能删，ios会报损
		border-bottom-color: rgba(252, 201, 40, 0); //不能删，ios会报损
		background-color: #F1F1F5;

		&>.bg {
			height: 318rpx;
			justify-content: flex-end;
			position: relative;
			overflow: hidden;

			//椭圆
			&::after {
				content: "";
				position: absolute;
				width: 200%;
				height: 348rpx;
				border-radius: 100%;
				left: -50%;
				top: -30rpx;
				background: #FCC928;
			}
		}

		&>.my-title {
			position: relative;
			padding-bottom: 38rpx;
			border-radius: 7px 7px 0 0;
			margin: -204.6rpx 30rpx 0;
			box-shadow: 0 2px 14px 0 rgba(96, 52, 0, 0.1);
			background: #FFFFFF;
			display: flex;
			flex-direction: column;
			align-items: center;

			&>.avatar {
				position: absolute;
				top: -75rpx;

				&>.avatar-pic {
					width: 150rpx;
					height: 150rpx;
					border-radius: 50%;
					background-color: #f3f3f3;
				}

				&>.crown {
					// border: 1px solid #55aa7f;
					position: absolute;
					left: 0;
					top: -50rpx;
					width: 98rpx;
					height: 74rpx;
				}
			}

			&>.name {
				height: 48rpx;
				margin: 96rpx 0 30rpx;
				display: flex;
				position: relative;
				align-items: center;

				&>text {
					font-size: 17px;
				}

				&>image {
					position: absolute;
					right: -46rpx;
					width: 26rpx;
					height: 26rpx;
				}
			}

			&>.category {
				background-color: #FFFFFF;
				display: flex;
				width: 100%;

				&>view {
					position: relative;
					display: flex;
					flex-direction: column;
					align-items: center;
					justify-content: center;
					flex: 1;

					&>text {
						font-size: 22px;
						color: #F39B19;
						height: 60rpx;
						margin-bottom: 10rpx;
					}

					&>view {
						height: 34rpx;
						font-size: 12px;
						color: rgba(64, 33, 16, 0.70);
						text-align: center;
						margin-right: 2rpx;
					}

					&::after {
						content: "";
						position: absolute;
						right: 0rpx;
						width: 2rpx;
						height: 50rpx;
						background: #F0F0EF;
						border-radius: 2.5px;
					}
				}
			}
		}

		&>.info {
			background-color: #FFFFFF;
			margin: 0 30rpx 60rpx 30rpx;
			padding: 30rpx;

			&>text {
				height: 40rpx;
				position: relative;
				text-align: center;
				font-weight: bold;
				display: flex;
				align-items: center;

				&::before {
					content: "";
					position: absolute;
					left: -30rpx;
					width: 4rpx;
					height: 28rpx;
					background: #FCC928;
					border-radius: 1px;
				}
			}
		}

		.my-info-center {
			// border: 1px solid;
			width: 100%;
			height: 100%;
			margin-top: -30rpx;
			// background: red;
			display: flex;
			justify-content: center;
			align-items: center;
			flex-direction: column;

			.my-info-center-item {
				width: 100%;
				display: flex;
				justify-content: center;
				align-items: center;

				.my-info-center-item-left {
					position: relative;
					width: 160rpx;
					padding-right: 10rpx;

					// border: 1px solid;
					.tips3 {
						// border: 1px solid;
						position: absolute;
						right: 5%;
						top: -70%;
						z-index: 9;

						// width: 50rpx;
						// border: 1px solid;
						image {
							width: 50rpx;
							height: 100%;
						}
					}

					text {
						color: #000;
						font-size: 24rpx;
					}
				}

				.my-info-center-item-mid {
					flex: 1;
					// border: 1px solid;
				}

				.my-info-center-item-right {
					width: 70rpx;
					margin-left: 15rpx;
					// border: 1px solid;
					display: flex;
					justify-content: center;
					align-items: center;
					font-size: 26rpx;

					// font-weight: 600;
					text {
						color: #F67700;
					}

					// border: 1px solid;
				}
			}
		}

		&>.my-info {
			box-shadow: 0 2px 4px 0 rgba(96, 52, 0, 0.10);
			border-radius: 0 0 7px 7px;
			position: relative;

			.mm-tips {
				width: 106%;
				position: absolute;
				// border: 1px solid;
				top: -8%;
				left: -22rpx;
				z-index: 99999;

				image {
					width: 100%;
					height: 100%;
				}
			}

			&>view {
				display: flex;
				justify-content: space-between;

				&>view {
					&>view {
						margin-top: 30rpx;

						text:first-child {
							color: rgba(64, 33, 16, 0.50);
							// margin-right: 30rpx;
						}
					}
				}
			}
		}

		&>.expect-work {
			box-shadow: 0 2px 4px 0 rgba(96, 52, 0, 0.10);
			border-radius: 7px;

			&>.tags {
				height: 52rpx;
				margin-top: 20rpx;
				display: flex;

				text {
					line-height: 40rpx;
					padding: 8rpx 18rpx;
					color: #F39B19;
					background: rgba(243, 155, 25, 0.15);
					border-radius: 2px;
					margin-right: 30rpx;
				}
			}
		}

		&>.ta {
			// border: 1px solid #000000;
			border-radius: 7px;
			margin: 30rpx 30rpx 130rpx;
			box-shadow: 0 2px 4px 0 rgba(96, 52, 0, 0.1);
			background-color: #FFFFFF;

			&>.category {
				display: flex;
				border-radius: 7px 7px 0 0;
				background-color: #FBFAF9;

				&>view {
					position: relative;
					width: 375rpx;
					height: 90rpx;
					display: flex;
					justify-content: center;
					align-items: center;
					color: rgba(64, 33, 16, 0.50);
					background: #EFEAE5;

					// border: 1px solid red;
					// 选中样式
					&.select {
						border-radius: 7px 7px 0 0;
						display: flex;
						justify-content: center;
						color: #F39B19;
						font-weight: bold;
						background-color: #FFFFFF;

						&::before {
							content: "";
							position: absolute;
							bottom: 0;
							width: 70rpx;
							height: 4rpx;
							background: #F39B19;
							border-radius: 1px;
						}
					}
				}
			}

			&>.comment-list {
				background-color: #FFFFFF;
				border-radius: 7px;

				&>.btns {
					margin-top: 30rpx;
					display: flex;

					&>.btn {
						width: 180rpx;
						height: 60rpx;
						border-radius: 6rpx;
						border: 1px solid #FF851D;
						text-align: center;
						line-height: 60rpx;
						margin-left: 20rpx;
						color: #FF851D;
						display: flex;
						justify-content: space-around;
						align-items: center;

						&>image {
							width: 36rpx;
							height: 36rpx;
						}
					}

					&>.haoping-btn {
						font-size: 28rpx;
						font-weight: bold;
						display: flex;
						align-items: center;
						margin-left: 50rpx;

						&>.switch {
							transform: scale(0.7);
						}
					}
				}

				&>.item {
					position: relative;
					padding: 30rpx;

					&>.by-user {
						display: flex;
						justify-content: space-between;

						&>.left {
							display: flex;
							align-items: center;

							image {
								width: 70rpx;
								height: 70rpx;
								border-radius: 50%;
								margin-right: 30rpx;
							}

							&>.middle {
								font-size: 12px;

								&>view {
									height: 34rpx;
									margin-bottom: 10rpx;
								}

								&>text {
									color: rgba(64, 33, 16, 0.50);
									height: 34rpx;
								}
							}
						}

						&>.star {
							margin-right: 20rpx;

							&>view {
								display: flex;
								align-items: center;

								&>image {
									width: 40rpx;
									height: 40rpx;
									margin-right: 10rpx;
								}
							}
						}
					}

					&>.content {
						margin-left: 100rpx;
					}

					//横线
					&::before {
						content: "";
						position: absolute;
						bottom: 0rpx;
						width: 630rpx;
						height: 2rpx;
						background: #F2F2F2;
						border-radius: 1px;
					}
				}

				&>.item:last-child {
					&::before {
						display: none;
					}
				}

				&>.zhedie {
					font-size: 28rpx;
					font-weight: 500;
					text-align: center;
					margin-top: 50rpx;
				}
			}

			&>.job-list {
				position: relative;

				&>view {
					position: relative;
					padding: 30rpx;

					&>view:first-child {
						height: 40rpx;

						text {
							font-weight: bold;
						}
					}

					&::before {
						content: "";
						position: absolute;
						bottom: 0rpx;
						width: 630rpx;
						height: 2rpx;
						background: #F2F2F2;
						border-radius: 0.5px;
					}

					&>.list {
						&>view {
							line-height: 40rpx;
							display: flex;
							align-items: center;
							margin-top: 20rpx;

							&>view:first-child {
								background: rgba(64, 33, 16, 0.30);
								height: 10rpx;
								width: 10rpx;
								border-radius: 50%;
								margin-right: 20rpx;
							}

							&>view:last-child {
								height: 40rpx;
							}
						}
					}

					&>.more-button {
						position: absolute;
						right: 30rpx;
						bottom: 30rpx;
						display: flex;

						image {
							width: 14rpx;
							height: 8rpx;
							margin-left: 10rpx;
						}

						&>view {
							display: flex;
							align-items: center;
						}
					}
				}

				&>view:last-child {
					&::before {
						display: none;
					}
				}

				.ta-skill {
					display: flex;
					flex-direction: column;

					&-title {
						font-size: 28rpx;
						font-weight: bold;
						color: #402110;
					}

					&-content {
						height: 90rpx;
						display: flex;
						justify-content: space-between;
						align-items: center;

						&-flex {
							display: flex;
							justify-content: center;
							align-items: center;
						}

						&-dot {
							width: 10rpx;
							height: 10rpx;
							border-radius: 50%;
							background: rgba(64, 33, 16, 0.3000);
							margin-right: 20rpx;
						}

						&-data {
							display: flex;

							&>text {
								font-size: 28rpx;
								color: #402110;
							}

							&-color {
								color: #F39B19 !important;
								margin-left: 40rpx;
							}
						}
					}
				}
			}
		}

		&>.fix-bottom {
			z-index: 1;
			position: fixed;
			bottom: 0;
			width: 100vw;
			background-color: #FFFFFF;
			display: flex;
			align-items: center;

			&>view {
				display: flex;
				flex-direction: column;
				align-items: center;
				justify-content: center;
				width: 30vw;

				&>image {
					width: 42rpx;
					height: 42rpx;
					margin-bottom: 10rpx;
				}

				&>text {
					font-size: 12px;
				}
			}

			// & > view:first-child {
			// 	margin-left: 46rpx;
			// }
			// & > view:nth-child(2) {
			// 	margin: 0 56rpx 0 76rpx;
			// }
			&>.button {
				flex: 1;
				height: 100rpx;

				// background-color: #FCC928;
				&:active {
					opacity: 0.7;
				}
			}
		}
	}

	.mask-head-image {
		width: 100vw;
		height: 100vh;
		position: fixed;
		top: 0;
		left: 0;
		display: flex;
		justify-content: center;
		align-items: center;
		background-color: #000000;
		z-index: 9999;
	}

	.haoping-view {
		width: 164rpx;
		height: 32rpx;
		background: #FCC928;
		border-radius: 16rpx;
		font-size: 24rpx;
		font-weight: 500;
		color: #2F0E00;
		display: flex;
		flex-direction: row;
		justify-content: center;
		align-items: center;
	}

	.sex-nan {
		width: 73rpx;
		height: 32rpx;
		background: #1862F9;
		border-radius: 4rpx;
		margin-left: 8rpx;
		display: flex;
		flex-direction: row;
		justify-content: center;
		align-items: center;
		font-size: 20rpx;
		font-weight: 400;
		color: #FFFFFF;
		line-height: 20rpx;
	}

	.sex-nv {
		width: 73rpx;
		height: 32rpx;
		background: #FD5D51;
		border-radius: 4rpx;
		margin-left: 8rpx;
		display: flex;
		flex-direction: row;
		justify-content: center;
		align-items: center;
		font-size: 20rpx;
		font-weight: 400;
		color: #FFFFFF;
		line-height: 20rpx;
	}

	.sex-image {
		width: 17rpx;
		height: 17rpx;
		margin-right: 9rpx;
	}

	.vip-crown {
		width: 152rpx;
		height: 32rpx;
		background: linear-gradient(0deg, #111832, #343B54);
		border-radius: 16rpx;
		position: absolute;
		top: 120rpx;
		display: flex;
		flex-direction: row;
		justify-content: center;
		align-items: center;

		&>image {
			width: 28rpx;
			height: 28rpx;
			margin-right: 4rpx;
		}

		&>text {
			font-size: 20rpx;
			font-weight: 500;
			color: #FCC928;
			line-height: 32rpx;
		}
	}

	.avatar-pic-vip {
		width: 147rpx;
		height: 147rpx;
		border-radius: 50%;
		border: 3rpx solid #FCC928;
	}

	.vip-avatar {
		width: 170rpx;
		height: 170rpx;
		background-image: url(https://images.linglinggong.net/icon3/7868789.png);
		background-size: cover;
	}

	/deep/.u-line-progress__line {
		background: linear-gradient(to right, #EDEA2F 15%, #F77700 80%) !important;
	}
</style>